package org.cmg.study.spring.controller;

import org.cmg.study.spring.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author CMG
 * @version 1.0
 * @cLassName ConvertController
 * @description
 * @date 2021/9/6 8:55
 **/
@Controller
public class ConvertController {

    @RequestMapping("/converter")
    public String myConvert(@RequestParam("user")User user, Model model){
        model.addAttribute("user", user);
        System.out.println("原始数据：" + user);
        return "showUser";
    }
}
